home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
330_03
/
tskconf.h
< prev
next >
Wrap
Text File
|
1990-10-10
|
17KB
|
451 lines
;/* --- Version 2.2 90-10-12 16:16 ---
COMMENT ^
TSKCONF.H - CTask - Configuration definitions
Public Domain Software written by
Thomas Wagner
Ferrari electronic Gmbh
Beusselstrasse 27
D-1000 Berlin 21
Germany
This file has been changed in version 2.1 to allow inclusion in
both the C and the Assembler parts. This avoids confusion and hard
to find errors due to mismatched configurations. It's still possible
to make errors, but since everything is close together, it's easier
to spot the problem. Please be extra careful to ensure that the
C and Assembler definitions agree.
*/
#define FALSE 0
#define TRUE 1 /*^
FALSE = 0
TRUE = 0ffffh ; Note: Assembler definition is different
COMMENT ^
CODE_SHARING If TRUE, the generated kernel supports code sharing.
This requires the entry points to load ds on entry,
and compilation with Large model (MSC) or Huge model (TC).
The default is FALSE.
NEAR_CODE If TRUE, all CTask routines are 'near'.
Use only with small model.
You will have to change the make-files so the
compiler model is no longer Large, and the code segment
is not named, when turning on this flag.
The default is FALSE.
LOCALS_FAR If TRUE, internal CTask routines ar 'far'.
This might be necessary if your compiler/linker does
not allow placing all CTask kernel code in a common
segment.
Do not set this flag if NEAR_CODE is set.
The default is FALSE.
CALL_PASCAL Use Pascal calling sequence for CTask routines.
This may save some code, but may cause naming
conflicts if your compiler limits external Pascal
names to 8 characters.
The default is FALSE.
TC_HUGE (Assembler only)
Define TC_HUGE for use with the Turbo C Huge
model, and if it is desired to separate CTask's data
from the normal data segment.
This flag causes the CTASK_DATA segment to be defined,
(class is DATA) and DS to be loaded with this segment
on function entry.
The C functions in the CTask kernel must be compiled
to use the same data segment.
The default is not defined.
LOAD_DS (Assembler only)
Define LOAD_DS to reload the data segment on entry
to global functions.
This flag must be defined for TC_HUGE. It can also be
defined if the data segment can not safely be assumed to be
loaded in DS on function entry, for example if the code
sharing feature of version 2.1 is used. The C routines
must be compiled with the necessary compiler switches
or the _loadds keyword in this case.
The default is not defined.
ROM_CODE (Assembler only)
Define ROM_CODE TRUE for embedded systems using ROM-
based code. This option disables storing variables in
the code segment.
The default is FALSE.
FAR_STACK (Assembler only)
If FAR_STACK is defined TRUE, the local stacks used
by CTask interrupt handlers are allocated outside the
default data segment. This may require changes in the
standard start-up module to make sure the segment
ordering is correct. The Turbo C linker may be confused
and place the CTask-stack segment in the middle of the
DGROUP if no mention is made of the segment in C0.ASM.
The default is FALSE.
CAUTION: Changing requires recompile of all sources.
*/
#define CODE_SHARING FALSE
#define NEAR_CODE FALSE
#define LOCALS_FAR FALSE
#define CALL_PASCAL FALSE /*^
CODE_SHARING = FALSE
NEAR_CODE = FALSE
LOCALS_FAR = FALSE
CALL_PASCAL = FALSE
ROM_CODE = FALSE ; ASM only
FAR_STACKS = FALSE ; ASM only
; The following two defines may be defined on the command line (any value)
; or uncommented here. To disable, don't set to FALSE, comment them out.
; Setting TC_HUGE is sufficient to enable both options.
; TC_HUGE = 1 ; ASM only
; LOAD_DS = 1 ; ASM only
IFDEF TC_HUGE
LOAD_DS = 1
ENDIF
COMMENT ^
TSK_DYNAMIC if TRUE, creating dynamic control blocks is allowed.
This option should normally be disabled in embedded
systems. Disabling the option will also save some
code, and eliminate the (model dependent) references
to the C memory allocation routines. This could be
useful for TSR or spawning kernels, and if you don't
use the dynamic allocation feature anyway.
The tsksio module requires TSK_DYNAMIC to be set
if on-line definition of new ports is desired.
The default is TRUE.
CAUTION: Changing requires recompile of all sources.
TSK_DYNLOAD if FALSE, this instance of the kernel does not include
dynamic allocation routines.
Setting this flag to FALSE when TSK_DYNAMIC is TRUE
only makes sense with multiple linked kernels. A resident
kernel might not employ dynamic allocation, whereas a
secondary kernel needs it. In this situation, TSK_DYNAMIC
must be set in the primary so that the task kill code
is included and the kernel configurations match, but
TSK_DYNLOAD may be false to prevent inclusion of the
malloc/free run-time routines.
This option has no effect if TSK_DYNAMIC is FALSE.
The default is TRUE.
CAUTION: Changing requires recompile of tskinst.c and tskgrp.c.
*/
#define TSK_DYNAMIC TRUE
#define TSK_DYNLOAD TRUE /*^
TSK_DYNAMIC = TRUE
TSK_DYNLOAD = TRUE
COMMENT ^
IBM if TRUE, routines specific to the IBM family of PCs
(and clones) are installed.
The default is TRUE.
DOS if TRUE, routines specific to PC/MS-DOS are installed.
The default is TRUE.
NOTE: If you disable IBM, you have to provide timer and keyboard
hardware support yourself. Check the areas in "tskmain.c"
that are affected by this define.
If you disable DOS, the resulting version can not be
used under DOS without significant restrictions.
The program can be tested, but DOS is not protected
from multiple entrance, so that concurrent DOS calls
will crash the system. You can use this configuration
(IBM true, DOS false) to debug embedded applications
which do not use DOS calls under DOS.
CAUTION: Changing requires recompile of all sources.
*/
#define IBM TRUE
#define DOS TRUE /*^
IBM = TRUE
DOS = TRUE
COMMENT ^
TSK_NAMEPAR if TRUE, the create_xxx routines accept a name parameter.
The default is TRUE.
TSK_NAMED if TRUE, control block names are processed.
The default is TRUE.